﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OrderAdd.aspx.cs" Inherits="WebSite.admin.order.OrderAdd" %>
<%@ Register src="../../Controls/AddressArea.ascx" tagname="AddressArea" tagprefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

   <head id="Head1" runat="server">
    <title>万里通后台管理系统</title>
     <link href="../main.css" rel="stylesheet" type="text/css" />
    <script language="javascript">
        parent.maintitle.innerHTML = "订单管理";
        parent.contentmain.innerHTML = "<span class='title01'>所在位置：</span>添加订单"
    </script>
    <script language='javascript' type="text/jscript">
        var path = (window.top.location).toString();
        if (path.indexOf('login.aspx') == -1) {
            if (path.indexOf('index.aspx') == -1) {
                window.top.location = 'index.aspx';
            }
        }
	</script>
     <script language="javascript" type="text/javascript">

         function SetNum(id) {

             var oNum = document.getElementById(id);
             if (!isNaN(oNum.value)) {
                 if (oNum.value < 0) {
                     oNum.value = 1;
                 }
             }
             oNum.value = parseInt(oNum.value);
         }

         function checkForm() {
           //  alert('<%=txtUserName.ClientID %>');
             var userName = document.getElementById('<%=txtUserName.ClientID %>');
             //alert(userName.value);
             var tel = document.getElementById('<%= txtTel.ClientID %>');
             var phone = document.getElementById('<%= txtPhone.ClientID %>');;
             var address = document.getElementById('<%= txtAddress.ClientID %>');
             var oProvence = document.getElementById("AddressArea1_ddlProvence");
             var oArea = document.getElementById("AddressArea1_ddlArea");
             if (userName.value == "") {
                 alert('收件人不能为空!');
                 userName.focus();
                 return false;
             }  if (tel.value == "" && phone.value == "") {
                 alert('手机与电话至少填一项！');
                 tel.focus();
                 return false;
             }
             if (oProvence.value == "选择省") {
                 alert("请选择省");
                 oProvence.focus();
                 return false;
             }
             if (oArea.value == "选择地区") {
                 alert("请选择地区");
                 oArea.focus();
                 return false;
             }
              if (address.value == "") {
                 alert("地址不能为空!");
                 address.focus();
                 return false;
             }
         }
   </script>

   <style type="text/css">
      .HiddRow
      {
          visibility : hidden;
          }
       .box
       {}
     
   </style>
</head>

<body  bgcolor="#F1F4F7">
    <form id="form1" runat="server">
    <div style="padding-left:10px">
    <br />
  <table Width="98%" border="0" cellspacing="0" cellpadding="3">
    <tr>
    <td> 
      订单编号：<asp:Label ID="lblOrderCode" ForeColor="Red" runat="server" Text=""></asp:Label>
     </td>
    </tr>
    <tr>
    <td>卡号：
    <asp:TextBox ID="txtCardCode" runat="server"></asp:TextBox>
   密码：
    <asp:TextBox ID="txtCardPassword" runat="server" TextMode="Password" MaxLength="20"></asp:TextBox>
             <asp:ImageButton ID="ibtnAdd" ImageUrl="../images/button05.gif" runat="server" OnClick="ibtnAdd_Click" /> 
 </td> </tr>

    <tr>
    <td><asp:Label ID="lblCardDescription" ForeColor="Red" runat="server"></asp:Label>
 </td> </tr>

         <tr><td><strong>卡片信息</strong></td></tr>

         <tr><td>
             <asp:Literal ID="ltCardInfo" runat="server"></asp:Literal>
             </td></tr>

    <tr><td><strong>送货地址</strong></td></tr>
    <tr><td>
    <table width="95%" border="0" cellpadding="0" cellspacing="1" >
             <tr>
		       <td height="25" align="right">收件人：</td>
		       <td align="left" >　
	           <asp:TextBox ID="txtUserName" CssClass="box" runat="server" size="20" maxlength="100"></asp:TextBox>
                   *</td>
	        </tr>
		     <tr>
		       <td height="25" align="right" >联系电话：</td>
		       <td align="left">　
	           <asp:TextBox ID="txtTel" CssClass="box" runat="server" size="20" maxlength="100"></asp:TextBox>
                   &nbsp;
                   电话和手机至少填一项</td>
	        </tr>
		     <tr>
		       <td height="25" align="right" >手 机：</td>
		       <td align="left" >　
	           <asp:TextBox ID="txtPhone" CssClass="box" runat="server" size="20" maxlength="100"></asp:TextBox></td>
	        </tr>
		     <tr style="display:none">
		       <td height="25" align="right" >邮 编：</td>
		       <td align="left" >　
	           <asp:TextBox ID="txtPost" CssClass="box" runat="server" size="20" maxlength="100"></asp:TextBox>*</td>
	        </tr>
		     <tr>
		       <td height="25" align="right" >地 址：</td>
		       <td align="left" >　
                   <uc1:AddressArea ID="AddressArea1" runat="server" />
	           <asp:TextBox ID="txtAddress" CssClass="box" runat="server" 
                       maxlength="200" Width="300px"></asp:TextBox>*</td>
	        </tr>
		     <tr>
		       <td height="25" align="right">送货日期：</td>
		       <td align="left" >　
	            <asp:TextBox ID="txtSendDate" CssClass="box"  style="behavior:url('../../LWDP.HTC'); width: 80px;" runat="server"
                        ></asp:TextBox> *此日期为发货日期，不是到货日期</td>
	        </tr> 
		     <tr>
		       <td height="25" align="right">&nbsp;</td>
		       <td align="left" >*到货日期为发货日期延后二天，但由于快递送达时间不受人为因素所控制，实际到货前后会有一天的误差。</td>
	        </tr> <tr>
		       <td height="25" align="right" >备注：</td>
		       <td align="left" >　
	           <asp:TextBox ID="txtRemark" CssClass="box" runat="server" MaxLength="300"
                       Width="418px"></asp:TextBox>*</td>
	        </tr> 
	      </table>
          </td> </tr></table></div>
    <div align="center">
      <asp:ImageButton ID="ibtnSubmit" ImageUrl="../images/btnSubmit.gif" runat="server" OnClientClick="return checkForm()" OnClick="ibtnSubmit_Click" />
    </div>
    </form>
</body>
</html>
